Release 10.1A: OpenEdge Development:
Web Services
Coding options for wrapped document literal
For Wrapped Doc/Lit operations, the 4GL allows you to use one or both of two alternate forms for accessing the operation
INPUTandOUTPUTparameters using 4GL procedures and functions. You can either access them in wrapped form as XML strings containing the complex data for each SOAP message (request and response) or you can access them in unwrapped form as several 4GL parameters, in many cases, with simple 4GL data types. You can overload these forms. That is, you can use both forms for the same operation in the same client session.Using the wrapped form
Suppose you have a Wrapped Doc/Lit operation,
foo. The one complex input parameter contains a single element with two child elements, XML Schemabooleanandintvalues. The one complex output parameter also contains a single element with two child elements, XML Schemaintandstringvalues. Using the wrapped form, you might run thefooprocedure with theINPUTparameter (param1) set to the XML string as shown in this example:
On the return, you might display an XML string in the
OUTPUTparameter (param2) as follows:
Clearly, to work with the individual values contained in these parameters, you must treat them as complex data (see the "Complex data example" section).
Using the unwrapped form
Using the unwrapped form for the same Wrapped Doc/Lit operation,
foo, you can access all the parameter values individually using 4GL data types. In this case, the WSDL Analyzer recognizes that there is a singleINTEGERmapping for a value in both complex input and output parameters of the wrapped operation. So, it prescribes a singleINPUT-OUTPUTparameter for thatINTEGERmapping (iInteger). It prescribes individualINPUTandOUTPUTmodes for the remaining values, as indicated in this example:
On return, you might display the individual OUTPUT values (
iIntegerandcString) as follows:
No further work is required to access these values in the 4GL.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |